<template>
  <div class="app">
    <Category/>
  </div>
</template>

<script setup>
  import { onMounted, onUnmounted} from 'vue'
  import eventBus from './utils/event-bus.js'
  import Category from './components/Category.vue'

  const eventBusHandler = (...arge) => {
    console.log('eventBus-name', arge)
  }

  onMounted(() => {
    eventBus.on('event-bus-name', eventBusHandler)
  })

  onUnmounted(() => {
    eventBus.off('event-bus-name', eventBusHandler)
  })

</script>

<style lang="scss" scoped></style>
